<?php 
use Wdl\helper\webHelper;
?>
 
<div class="panel panel-default">
    <ul class="nav nav-tabs" style="margin-top: 5px; padding-left: 10px;">
  
        <li class="{if (empty($rd) || $rd=='index')}active{/if}">
        <a href="{php echo $this->createWebUrl('slogs', array('op' => $operation))}"> 
			 {$submenus[$operation]['name']}列表</a></li>
       
    </ul>

    <div class="panel-body table-responsive">
       	 
        <form action="./index.php" method="get" class="form-horizontal" role="form">
            <div class="search-box" style="margin-bottom: 20px; width: 100%; align-items: center; ">          
		
                <div  style="margin-right: 10px;">
                    <span >关键字 :</span>
                </div>
          
				<div class="col-xs-12 col-sm-6 col-lg-6">
                    <input type="hidden" name="c" value="site" />
                    <input type="hidden" name="a" value="entry" />
                    <input type="hidden" name="m" value="kbwdl_shequzufang" />
                    <input type="hidden" name="do" value="slogs" />
                    <input type="hidden" name="op" value="{$operation}" />
                  
                    <input type="hidden" name="export" value="0" />
            
					<input class="form-control" name="keyword" id="" type="text" value="{$_GPC['keyword']}">

				</div>
                 <div class="col-xs-12 col-sm-2 col-lg-2">

					<button class="btn btn-default"><i class="fa fa-search"></i> 搜索</button>

				</div>
             
        </div>
		</form>
      
        <!-- 搜索结束 -->
        <table class="table table-hover">
			<thead class="navbar-inner">
			 {if $ftype=='charges'}	<tr>
                    <th style="width:5%;">ID</th>
					<th style="width:45%;">推荐内容</th>
					<th >类型</th>		 
				 	<th >进度 </th>
					<th style="text-align:right">管理</th>
				</tr>
                          {else}
                          <tr>
                    <th style="width:5%;">ID</th>
					<th style="width:45%;">房源标题</th>
					<th >类型</th>		 
				 	<th >数量 </th>
					<th style="text-align:right">访问信息</th>
				</tr>
                          {/if}
			</thead>
			<tbody>
				{loop $list $item}
				<tr>
					<td>{$item['id']}</td>
					<td>
                        <p>                                           
					  <span style="color:red">{php echo  webHelper::zhutypeLabel($item['ftype'])}</span>
                      <span style="color: #999;">[{$item['houseid']}]</span>
                      {$item['title']}
                        </p>
                        <p> {$item['smalltext']}</p>
					</td>
					<td>
                        <p> 	 
                        {if $item['acttype']=='view'}浏览{/if}	 
                        {if $item['acttype']=='fav'}收藏{/if}
                         
                        </p>
                    </td>
   
					<td>
                            {if $ftype=='charges'}
                            {php $item['hits']=max(1,$item['hits'])}
                            {$charges_step[$item['hits']]}
                            {else}
                            {php echo max(1,$item['hits'])}次
                            {/if}
					</td>

					<td style="text-align:right;">
                        {if $item['nickname']}
                        <a href="{php echo $this->createWebUrl('sbroker', array('id' => $item['bid'], 'op' => 'editbroker'))}">
                            <span style="color:blue">{$item['nickname']} -{$item['mobile']} </span></a>
                        {else} --{/if}
                        {if $item['last_time']}                                           
                            <p>浏览:{php echo date('Y-m-d H:i:s',$item['last_time'])}</p>
                        {else}
                            <p>时间:{php echo date('Y-m-d H:i:s',$item['addtime'])}</p>
                            {/if}
                        <p style="text-align: right">
                            {if $ftype=='charges'}
                            <a href="{php echo $this->createWebUrl('feed', array('actid' => $item['id'] ,'op'=>'detail','ftype'=> $item['acttype']))}"  class="btn btn-default btn-sm" title="报备记录"> 报备记录</a>  
                            {/if}
                            {if $item['ftype']==8 || $item['ftype']==3}
                            <a href="{php echo $this->createWebUrl('feed', array('actid' => $item['id'] ,'op'=>'realdo','ftype'=> $item['acttype']))}"  class="btn btn-default btn-sm" title="处理后前端不可见"> 
                            {if $item['hits']==0} <span style="color:red">待处理</span>{/if} 
                            {if $item['hits']==1} 已处理{/if} 
                            </a>    
                            {/if}
                            <a href="{php echo $this->createWebUrl('feed', array('id' => $item['id'] ,'ftype'=> $item['acttype']))}" onclick="return confirm('此操作不可恢复，确认删除？');return false;" class="btn btn-default btn-sm" title="删除"><i class="fa fa-times"></i></a>
                        </p>
					</td>

				</tr>

				{/loop}

			</tbody>

		</table>

		{$pager}
    </div>
</div>